{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>热水事件</th>\n",
       "      <th>起始数据编号</th>\n",
       "      <th>终止数据编号</th>\n",
       "      <th>开始时间（begin_time）</th>\n",
       "      <th>根据日志判断是否为洗浴（1表示是，0表示否）</th>\n",
       "      <th>洗浴时间点</th>\n",
       "      <th>总用水时长（w_time）</th>\n",
       "      <th>总停顿时长（w_pause_time）</th>\n",
       "      <th>平均停顿时长（avg_pause_time）</th>\n",
       "      <th>停顿次数（pause）</th>\n",
       "      <th>用水时长（use_water_time）</th>\n",
       "      <th>用水/总时长（use_water_rate）</th>\n",
       "      <th>总用水量（w_water）</th>\n",
       "      <th>平均水流量（water_rate）</th>\n",
       "      <th>水流量波动（flow_volatility）</th>\n",
       "      <th>停顿时长波动（pause_volatility）</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>218</td>\n",
       "      <td>344</td>\n",
       "      <td>2014-10-19 08:51:30'</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>591.999998</td>\n",
       "      <td>303.500013</td>\n",
       "      <td>50.583336</td>\n",
       "      <td>6</td>\n",
       "      <td>288.499985</td>\n",
       "      <td>0.487331</td>\n",
       "      <td>12.998333</td>\n",
       "      <td>2.703293</td>\n",
       "      <td>0.870856</td>\n",
       "      <td>650.106848</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>569</td>\n",
       "      <td>965</td>\n",
       "      <td>2014-10-19 15:55:23'</td>\n",
       "      <td>1</td>\n",
       "      <td>15</td>\n",
       "      <td>1008.000005</td>\n",
       "      <td>46.499999</td>\n",
       "      <td>46.499999</td>\n",
       "      <td>1</td>\n",
       "      <td>961.500006</td>\n",
       "      <td>0.953869</td>\n",
       "      <td>50.626667</td>\n",
       "      <td>3.159230</td>\n",
       "      <td>0.202300</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1077</td>\n",
       "      <td>1128</td>\n",
       "      <td>2014-10-19 18:21:40'</td>\n",
       "      <td>0</td>\n",
       "      <td>18</td>\n",
       "      <td>467.999997</td>\n",
       "      <td>269.499987</td>\n",
       "      <td>53.899997</td>\n",
       "      <td>5</td>\n",
       "      <td>198.500010</td>\n",
       "      <td>0.424145</td>\n",
       "      <td>7.087500</td>\n",
       "      <td>2.142317</td>\n",
       "      <td>0.404960</td>\n",
       "      <td>531.384976</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1973</td>\n",
       "      <td>2236</td>\n",
       "      <td>2014-10-20 16:42:41'</td>\n",
       "      <td>1</td>\n",
       "      <td>16</td>\n",
       "      <td>660.999996</td>\n",
       "      <td>23.499993</td>\n",
       "      <td>23.499993</td>\n",
       "      <td>1</td>\n",
       "      <td>637.500003</td>\n",
       "      <td>0.964448</td>\n",
       "      <td>32.193333</td>\n",
       "      <td>3.029961</td>\n",
       "      <td>0.291306</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>2320</td>\n",
       "      <td>2435</td>\n",
       "      <td>2014-10-20 18:05:28'</td>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>550.000005</td>\n",
       "      <td>164.500013</td>\n",
       "      <td>32.900003</td>\n",
       "      <td>5</td>\n",
       "      <td>385.499992</td>\n",
       "      <td>0.700909</td>\n",
       "      <td>13.459167</td>\n",
       "      <td>2.094812</td>\n",
       "      <td>0.395200</td>\n",
       "      <td>180.384977</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   热水事件  起始数据编号  终止数据编号      开始时间（begin_time）  根据日志判断是否为洗浴（1表示是，0表示否）  洗浴时间点  \\\n",
       "0     1     218     344  2014-10-19 08:51:30'                       0      8   \n",
       "1     2     569     965  2014-10-19 15:55:23'                       1     15   \n",
       "2     3    1077    1128  2014-10-19 18:21:40'                       0     18   \n",
       "3     4    1973    2236  2014-10-20 16:42:41'                       1     16   \n",
       "4     5    2320    2435  2014-10-20 18:05:28'                       1     18   \n",
       "\n",
       "   总用水时长（w_time）  总停顿时长（w_pause_time）  平均停顿时长（avg_pause_time）  停顿次数（pause）  \\\n",
       "0     591.999998           303.500013               50.583336            6   \n",
       "1    1008.000005            46.499999               46.499999            1   \n",
       "2     467.999997           269.499987               53.899997            5   \n",
       "3     660.999996            23.499993               23.499993            1   \n",
       "4     550.000005           164.500013               32.900003            5   \n",
       "\n",
       "   用水时长（use_water_time）  用水/总时长（use_water_rate）  总用水量（w_water）  \\\n",
       "0            288.499985                0.487331      12.998333   \n",
       "1            961.500006                0.953869      50.626667   \n",
       "2            198.500010                0.424145       7.087500   \n",
       "3            637.500003                0.964448      32.193333   \n",
       "4            385.499992                0.700909      13.459167   \n",
       "\n",
       "   平均水流量（water_rate）  水流量波动（flow_volatility）  停顿时长波动（pause_volatility）  \n",
       "0           2.703293                0.870856                650.106848  \n",
       "1           3.159230                0.202300                  0.000000  \n",
       "2           2.142317                0.404960                531.384976  \n",
       "3           3.029961                0.291306                  0.000000  \n",
       "4           2.094812                0.395200                180.384977  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# -*- coding:utf-8 -*-\n",
    "# 3）模型构建\n",
    "# 目标：判断是否是洗浴事件，是则1，不是则0\n",
    "# 建立、训练多层神经网络 并完成模型的检验\n",
    "# 选取”候选洗浴事件“的11个属性作为网络的输入，分别为：洗浴时间点、总用水时长、总停顿时长、平均停顿时长、停顿次数、\n",
    "# 用水时长、用水时长/总用水时长、总用水量、平均水流量、水流量波动和停顿时长波动\n",
    "from __future__ import print_function\n",
    "import pandas as pd\n",
    "from pandas import Series, DataFrame\n",
    "import numpy as np\n",
    "\n",
    "# 由于此单元的中间数据处理原书中有问题，所以此处采用书中给的训练数据，和测试数据，旨在测试模型在此数据上的运行\n",
    "inputfile1 = 'train_neural_network_data.xls' # 训练数据\n",
    "inputfile2 = 'test_neural_network_data.xls' # 测试数据\n",
    "testoutputfile = 'test_output_data.xls' #测试数据模型输出文件\n",
    "\n",
    "data_train = pd.read_excel(inputfile1) # 读入训练数据\n",
    "data_test = pd.read_excel(inputfile2) # 读入测试数据\n",
    "\n",
    "data_train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "x_train = data_train.iloc[:,5:17].as_matrix() # 训练样本特征\n",
    "y_train = data_train.iloc[:,4].as_matrix() # 训练样本标签列\n",
    "x_test = data_test.iloc[:,5:17].as_matrix() # 测试样本特征\n",
    "y_test = data_test.iloc[:,4].as_matrix() # 训练样本标签列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using Theano backend.\n",
      "D:\\Anaconda2\\lib\\site-packages\\keras\\models.py:844: UserWarning: The `nb_epoch` argument in `fit` has been renamed `epochs`.\n",
      "  warnings.warn('The `nb_epoch` argument in `fit` '\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 2/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 3/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 4/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 5/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 6/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 7/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 8/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 9/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 10/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 11/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 12/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 13/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 14/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 15/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 16/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 17/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 18/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 19/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 20/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 21/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 22/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 23/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 24/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 25/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 26/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 27/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 28/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 29/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 30/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 31/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 32/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 33/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 34/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 35/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 36/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 37/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 38/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 39/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 40/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 41/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 42/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 43/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 44/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 45/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 46/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 47/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 48/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 49/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 50/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 51/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 52/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 53/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 54/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 55/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 56/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 57/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 58/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 59/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 60/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 61/1000\n",
      "28/28 [==============================] - ETA: 0s - loss: 1.1921e-0 - 0s - loss: 3.4162         \n",
      "Epoch 62/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 63/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 64/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 65/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 66/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 67/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 68/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 69/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 70/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 71/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 72/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 73/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 74/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 75/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 76/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 77/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 78/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 79/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 80/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 81/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 82/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 83/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 84/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 85/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 86/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 87/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 88/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 89/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 90/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 91/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 92/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 93/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 94/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 95/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 96/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 97/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 98/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 99/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 100/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 101/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 102/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 103/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 104/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 105/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 106/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 107/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 108/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 109/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 110/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 111/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 112/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 113/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 114/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 115/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 116/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 117/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 118/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 119/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 120/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 121/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 122/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 123/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 124/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 125/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 126/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 127/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 128/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 129/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 130/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 131/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 132/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 133/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 134/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 135/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 136/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 137/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 138/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 139/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 140/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 141/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 142/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 143/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 144/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 145/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 146/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 147/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 148/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 149/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 150/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 151/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 152/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 153/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 154/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 155/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 156/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 157/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 158/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 159/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 160/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 161/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 162/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 163/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 164/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 165/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 166/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 167/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 168/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 169/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 170/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 171/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 172/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 173/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 174/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 175/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 176/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 177/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 178/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 179/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 180/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 181/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 182/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 183/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 184/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 185/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 186/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 187/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 188/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 189/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 190/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 191/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 192/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 193/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 194/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 195/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 196/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 197/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 198/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 199/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 200/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 201/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 202/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 203/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 204/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 205/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 206/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 207/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 208/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 209/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 210/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 211/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 212/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 213/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 214/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 215/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 216/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 217/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 218/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 219/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 220/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 221/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 222/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 223/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 224/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 225/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 226/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 227/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 228/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 229/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 230/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 231/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 232/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 233/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 234/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 235/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 236/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 237/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 238/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 239/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 240/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 241/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 242/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 243/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 244/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 245/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 246/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 247/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 248/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 249/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 250/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 251/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 252/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 253/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 254/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 255/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 256/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 257/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 258/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 259/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 260/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 261/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 262/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 263/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 264/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 265/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 266/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 267/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 268/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 269/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 270/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 271/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 272/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 273/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 274/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 275/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 276/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 277/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 278/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 279/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 280/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 281/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 282/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 283/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 284/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 285/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 286/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 287/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 288/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 289/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 290/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 291/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 292/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 293/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 294/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 295/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 296/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 297/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 298/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 299/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - ETA: 0s - loss: 3.5428 - 0s - loss: 3.4162     \n",
      "Epoch 300/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 301/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 302/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 303/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 304/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 305/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 306/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 307/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 308/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 309/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 310/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 311/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 312/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 313/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 314/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 315/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 316/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 317/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 318/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 319/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 320/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 321/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 322/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 323/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 324/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 325/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 326/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 327/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 328/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 329/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 330/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 331/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 332/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 333/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 334/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 335/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 336/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 337/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 338/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 339/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 340/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 341/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 342/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 343/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 344/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 345/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 346/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 347/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 348/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 349/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 350/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 351/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 352/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 353/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 354/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 355/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 356/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 357/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 358/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 359/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 360/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 361/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 362/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 363/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 364/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 365/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 366/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 367/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 368/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 369/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 370/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 371/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 372/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 373/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 374/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 375/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 376/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 377/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 378/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 379/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 380/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 381/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 382/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 383/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 384/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 385/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 386/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 387/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 388/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 389/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 390/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 391/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 392/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 393/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 394/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 395/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 396/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 397/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 398/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 399/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 400/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 401/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 402/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 403/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 404/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 405/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 406/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 407/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 408/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 409/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 410/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 411/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 412/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 413/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 414/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 415/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 416/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 417/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 418/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 419/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 420/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 421/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 422/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 423/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 424/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 425/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 426/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 427/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 428/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 429/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 430/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 431/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 432/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 433/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 434/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 435/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 436/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 437/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 438/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 439/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 440/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 441/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 442/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 443/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 444/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 445/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 446/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 447/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 448/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 449/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 450/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 451/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 452/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 453/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 454/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 455/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 456/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 457/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 458/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 459/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 460/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 461/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 462/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 463/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 464/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 465/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 466/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 467/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 468/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 469/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 470/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 471/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 472/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 473/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 474/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 475/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 476/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 477/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 478/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 479/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 480/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 481/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 482/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 483/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 484/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 485/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 486/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 487/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 488/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 489/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 490/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 491/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 492/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 493/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 494/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 495/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 496/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 497/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 498/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 499/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 500/1000\n",
      "28/28 [==============================] - ETA: 0s - loss: 1.1921e-0 - 0s - loss: 3.4162         \n",
      "Epoch 501/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 502/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 503/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 504/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 505/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 506/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 507/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 508/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 509/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 510/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 511/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 512/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 513/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 514/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 515/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 516/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 517/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 518/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 519/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 520/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 521/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 522/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 523/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 524/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 525/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 526/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 527/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 528/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 529/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 530/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 531/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 532/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 533/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 534/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 535/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 536/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 537/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 538/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 539/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 540/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 541/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 542/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 543/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 544/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 545/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 546/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 547/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 548/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 549/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 550/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 551/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 552/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 553/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 554/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 555/1000\n",
      "28/28 [==============================] - ETA: 0s - loss: 1.1921e-0 - 0s - loss: 3.4162         \n",
      "Epoch 556/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 557/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 558/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 559/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 560/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 561/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 562/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 563/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 564/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 565/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 566/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 567/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 568/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 569/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 570/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 571/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 572/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 573/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 574/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 575/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 576/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 577/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 578/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 579/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 580/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 581/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 582/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 583/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 584/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 585/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 586/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 587/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 588/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 589/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 590/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 591/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 592/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 593/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 594/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 595/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 596/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 597/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 598/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 599/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 600/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 601/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 602/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 603/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 604/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 605/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 606/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 607/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 608/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 609/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 610/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 611/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 612/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 613/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 614/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 615/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 616/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 617/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 618/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 619/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 620/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 621/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 622/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 623/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 624/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 625/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 626/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 627/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 628/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 629/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 630/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 631/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 632/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 633/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 634/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 635/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 636/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 637/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 638/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 639/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 640/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 641/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 642/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 643/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 644/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 645/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 646/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 647/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 648/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 649/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 650/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 651/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 652/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 653/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 654/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 655/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 656/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 657/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 658/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 659/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 660/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 661/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 662/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 663/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 664/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 665/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 666/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 667/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 668/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 669/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 670/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 671/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 672/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 673/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 674/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 675/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 676/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 677/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 678/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 679/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 680/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 681/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 682/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 683/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 684/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 685/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 686/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 687/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 688/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 689/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 690/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 691/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 692/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 693/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 694/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 695/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 696/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 697/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 698/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 699/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 700/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 701/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 702/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 703/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 704/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 705/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 706/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 707/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 708/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 709/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 710/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 711/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 712/1000\n",
      "28/28 [==============================] - ETA: 0s - loss: 1.1921e-0 - 0s - loss: 3.4162         \n",
      "Epoch 713/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 714/1000\n",
      "28/28 [==============================] - ETA: 0s - loss: 15.94 - 0s - loss: 3.4162      \n",
      "Epoch 715/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 716/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 717/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 718/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 719/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 720/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162       \n",
      "Epoch 721/1000\n",
      "28/28 [==============================] - ETA: 0s - loss: 2.5172    - 0s - loss: 3.4162     \n",
      "Epoch 722/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 723/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 724/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 725/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 726/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 727/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 728/1000\n",
      "28/28 [==============================] - ETA: 0s - loss: 3.5428 - 0s - loss: 3.4162     \n",
      "Epoch 729/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 730/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 731/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 732/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 733/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 734/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 735/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 736/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 737/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 738/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 739/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 740/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 741/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 742/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 743/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 744/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 745/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 746/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 747/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 748/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 749/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 750/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 751/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 752/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 753/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 754/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 755/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 756/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 757/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 758/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 759/1000\n",
      "28/28 [==============================] - ETA: 0s - loss: 1.1921e-0 - 0s - loss: 3.4162         \n",
      "Epoch 760/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 761/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 762/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 763/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 764/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 765/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 766/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 767/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 768/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 769/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 770/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 771/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 772/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 773/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 774/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 775/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 776/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 777/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 778/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 779/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 780/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 781/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 782/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 783/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 784/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 785/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 786/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 787/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 788/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 789/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 790/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 791/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 792/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 793/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 794/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 795/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 796/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 797/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 798/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 799/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 800/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 801/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 802/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 803/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 804/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 805/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 806/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 807/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 808/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 809/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 810/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 811/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 812/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 813/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 814/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 815/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 816/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 817/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 818/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 819/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 820/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 821/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 822/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 823/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 824/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 825/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 826/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 827/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 828/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 829/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 830/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 831/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 832/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 833/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 834/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 835/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 836/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 837/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 838/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 839/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 840/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 841/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 842/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 843/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 844/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 845/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 846/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 847/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 848/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 849/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 850/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 851/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 852/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 853/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 854/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 855/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 856/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 857/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 858/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 859/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 860/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 861/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 862/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 863/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 864/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 865/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 866/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 867/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 868/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 869/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 870/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 871/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 872/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 873/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 874/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 875/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 876/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 877/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 878/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 879/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 880/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 881/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 882/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 883/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 884/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 885/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 886/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 887/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 888/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 889/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 890/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 891/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 892/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 893/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 894/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 895/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 896/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 897/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 898/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 899/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 900/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 901/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 902/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 903/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 904/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 905/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 906/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 907/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162       \n",
      "Epoch 908/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 909/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 910/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 911/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 912/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 913/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 914/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 915/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 916/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 917/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 918/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 919/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 920/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 921/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 922/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 923/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 924/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 925/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 926/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 927/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 928/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 929/1000\n",
      "28/28 [==============================] - ETA: 0s - loss: 3.9856 - 0s - loss: 3.4162     \n",
      "Epoch 930/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 931/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 932/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 933/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 934/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162       \n",
      "Epoch 935/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 936/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 937/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 938/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 939/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 940/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 941/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 942/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 943/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 944/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 945/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 946/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 947/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 948/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 949/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 950/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 951/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 952/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 953/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 954/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 955/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 956/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 957/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 958/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 959/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 960/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 961/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 962/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 963/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 964/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 965/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 966/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 967/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 968/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 969/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 970/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 971/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 972/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 973/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 974/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 975/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 976/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 977/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 978/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 979/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 980/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 981/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 982/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 983/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 984/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 985/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 986/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 987/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 988/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     - ETA: 0s - loss: 4.1954\n",
      "Epoch 989/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 990/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 991/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 992/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 993/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 994/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 995/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     \n",
      "Epoch 996/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n",
      "Epoch 997/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162         \n",
      "Epoch 998/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162        \n",
      "Epoch 999/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162     e-0 - ETA: 0s - loss: 3.5428   \n",
      "Epoch 1000/1000\n",
      "28/28 [==============================] - 0s - loss: 3.4162      \n"
     ]
    }
   ],
   "source": [
    "\n",
    "# 训练神经网络时，对神经网络的参数进行寻优，发现含两个隐含层的神经网络训练效果较好\n",
    "# 其中两个隐层的节点数分别为17和10时训练效果较好\n",
    "\n",
    "from keras.models import Sequential\n",
    "from keras.layers.core import Dense, Dropout, Activation\n",
    "\n",
    "netfile = 'net.model'# 构建的神经网络模型存储路径\n",
    "\n",
    "model = Sequential() # 建立模型\n",
    "model.add(Dense(units=17, input_dim=11)) # 添加输入层、隐藏层的连接\n",
    "model.add(Activation('relu')) # 以relu函数为激活函数\n",
    "model.add(Dense(units=10, input_dim=17)) # 添加隐藏层、二层隐藏层的连接\n",
    "model.add(Activation('relu')) # 以relu函数为激活函数\n",
    "model.add(Dense(units=1, input_dim=10)) # 添加二层隐藏层、输出层的连接\n",
    "model.add(Activation('sigmoid')) # 以sigmoid函数为激活函数\n",
    "\n",
    "# 编译模型，损失函数为binary_crossentropy,用adam法求解\n",
    "model.compile(loss = 'binary_crossentropy', optimizer = 'adam')\n",
    "model.fit(x_train, y_train, nb_epoch = 1000, batch_size = 1)\n",
    "model.save_weights(netfile)# 保存模型参数\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28/28 [==============================] - 0s\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARAAAAD3CAYAAADVPAubAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGbJJREFUeJzt3XuUXGWZ7/HvrzuES7gE6UDuJGKIBsaEW8ig5wwKZkLE\nAV06J+EcEWUZYGRGRsdZDOOZ2xrX4PK2dMLIBGGAcxgEj2ZgaTQi6nBZCSSEcAkQCBCGNCEJIiEQ\nsOnOc/7Yu0PRVHft2lXVu6r692Ht1bV37drv003n6Xe/+70oIjAzy6Oj6ADMrHU5gZhZbk4gZpab\nE4iZ5eYEYma5OYGYWW5OIGaWmxOImeXmBGJmuTmBmFluo4oOwGwkU9d+Qc+ebCfvemNlRCxobETV\ncQIxK1LPHph3RLZzb9vS1dhgqucEYlYk0dINCU4gZkWTio4gNycQs0IJOlo3gbRw5alYkhZI2ihp\nk6RLi46n3Ui6RtJ2SQ8XHUtD9d/CZNmaUJOG1dwkdQJXAGcAs4DFkmYVG1XbuRZoqicODSNl25qQ\nE0g+c4FNEfFURPQA3wfOKjimthIRdwAvFh3HsFDGrQk5geQzCXi2ZH9LesysOiJpA8myNSE3opoV\nrTlzQyZOIPl0A1NK9ienx8yq16TtG1k4geSzBpghaTpJ4lgEnFNsSNaSBHS2bgJxG0gOEdELXAys\nBB4Fbo6IDcVG1V4k3QisAmZK2iLp/KJjapgWbkR1DSSniFgBrCg6jnYVEYuLjmF4NO8j2iycQMyK\n1P8UpkU5gZgVrXXzh9tAzApXp56okqZI+pWkRyRtkPT59Pg7JN0m6Yn066GDfL7q4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StpWJkk6HLgDOFvS/krmj/hIhngPAramYy7+54D3\nPiGpI435ncDGtOyL0vORdLSkMRnKGTHqORZmuLkGUrCI2JH+Jb9R0r7p4S9HxONKhmv/RNJuklug\ng8pc4vPAMknnA33ARRGxStLd6WPSn6btIO8BVqU1oFeA/5VOPHMT8ACwHViTIeT/TTJEfEf6tTSm\n/wLuBQ4GLoyI1yV9j6RtZJ2SwncAZ2f76YwUzZoeKlMN3eDNrEbHnXBc/OfqX2Y695DR77iv2cYF\n+RbGzHLzLYxZgZL2jdb9O+4EYlaw1m0BcQIxK5z7gZhZTs38kLay1r35MmsTdZ4TdUE61mpTuRHb\n6QDO76TvPyjp+FpidwIxK1x9UoikTuAKknFXs4DFkmYNOO0MkqEEM0iGRny3lsidQMyKpLrOBzIX\n2BQRT0VED/B94KwB55wFXB+J1cBYSRPyhu8EYlagOo/GnQQ8W7K/hbevTJflnMzciGpWoHX33b9y\n/1Fjsq7Lsp+ktSX7y4qesc0JxKxAEbGgjpfrBqaU7E9Oj1V7Tma+hTFrH2uAGZKmSxpNMlnUwDle\nbgXOTZ/GzCOZ7Glr3gJdAzFrExHRK+likikUOoFrImKDpAvT968EVpDMPrcJ2A18upYyPRrXzHLz\nLYyZ5eYEYma5OYGYWW5OIGaWmxOImeXmBGJmuTmBmFluTiBmltv/B0vv8XaGrGDuAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xf3227f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "predict_result_train = model.predict_classes(x_train).reshape(len(data_train)) #给出预测类别（训练集）\n",
    "from cm_plot import *\n",
    "cm_plot(y_train, predict_result_train).show() #显示混淆矩阵可视化结果 看训练结果正确率\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "21/21 [==============================] - 0s\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0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yOvBQxfu+fF/dPPholtCKW29buuWEyVMKHj5JBSpRlcGJwSyhiFhY4unWAjMr3s/I\n99XNXQmzznELsLuk2ZImki3CU2SNjSpuMZh1iIjYJOm9ZI+69wJLImJVI+fy05VmVsVdCTOr4sRg\nZlWcGMysihODmVVxYjCzKk4MZlbFicHMqjgxmFmV/wfDZSh7dx6D0AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1079eba8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.metrics import confusion_matrix\n",
    "predict_result_test = model.predict_classes(x_test).reshape(len(data_test)) #给出预测类别（测试集）\n",
    "from cm_plot import *\n",
    "cm = confusion_matrix(y_test, predict_result_test)\n",
    "cm_plot(y_test, predict_result_test).show() #显示混淆矩阵可视化结果 看训练结果正确率\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.80952380952380953"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from __future__ import division\n",
    "correctRate = (cm[1,1] + cm[0,0]) / cm.sum()\n",
    "correctRate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>热水事件</th>\n",
       "      <th>起始数据编号</th>\n",
       "      <th>终止数据编号</th>\n",
       "      <th>开始时间（begin_time）</th>\n",
       "      <th>根据日志判断是否为洗浴（1表示是，0表示否）</th>\n",
       "      <th>预测结果</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>73</td>\n",
       "      <td>336</td>\n",
       "      <td>2015-01-05 9:42:41'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>420</td>\n",
       "      <td>535</td>\n",
       "      <td>'2015-01-05 18:05:28'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>538</td>\n",
       "      <td>706</td>\n",
       "      <td>'2015-01-05 18:25:24'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>793</td>\n",
       "      <td>910</td>\n",
       "      <td>'2015-01-05 20:00:42'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>935</td>\n",
       "      <td>1133</td>\n",
       "      <td>'2015-01-05 20:15:13'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>1172</td>\n",
       "      <td>1274</td>\n",
       "      <td>'2015-01-05 20:42:41'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>1641</td>\n",
       "      <td>1770</td>\n",
       "      <td>'2015-01-06 08:08:26'</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>2105</td>\n",
       "      <td>2280</td>\n",
       "      <td>2015-01-06 11:31:13'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>2290</td>\n",
       "      <td>2506</td>\n",
       "      <td>'2015-01-06 17:08:35'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>2562</td>\n",
       "      <td>2708</td>\n",
       "      <td>'2015-01-06 17:43:48'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>3141</td>\n",
       "      <td>3284</td>\n",
       "      <td>'2015-01-07 10:01:57'</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>3524</td>\n",
       "      <td>3655</td>\n",
       "      <td>2015-01-07 13:32:43'</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>3659</td>\n",
       "      <td>3863</td>\n",
       "      <td>'2015-01-07 17:48:22'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>3937</td>\n",
       "      <td>4125</td>\n",
       "      <td>'2015-01-07 18:26:49'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>4145</td>\n",
       "      <td>4373</td>\n",
       "      <td>'2015-01-07 18:46:07'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>4411</td>\n",
       "      <td>4538</td>\n",
       "      <td>'2015-01-07 19:18:08'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>5700</td>\n",
       "      <td>5894</td>\n",
       "      <td>2015-01-08 7:08:43'</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>5913</td>\n",
       "      <td>6178</td>\n",
       "      <td>2015-01-08 13:23:42'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>6238</td>\n",
       "      <td>6443</td>\n",
       "      <td>2015-01-08 18:06:47'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>6629</td>\n",
       "      <td>6696</td>\n",
       "      <td>2015-01-08 20:18:58'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>21</td>\n",
       "      <td>6713</td>\n",
       "      <td>6879</td>\n",
       "      <td>2015-01-08 20:32:16'</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    热水事件  起始数据编号  终止数据编号       开始时间（begin_time）  根据日志判断是否为洗浴（1表示是，0表示否）  预测结果\n",
       "0      1      73     336    2015-01-05 9:42:41'                       1     1\n",
       "1      2     420     535  '2015-01-05 18:05:28'                       1     1\n",
       "2      3     538     706  '2015-01-05 18:25:24'                       1     1\n",
       "3      4     793     910  '2015-01-05 20:00:42'                       1     1\n",
       "4      5     935    1133  '2015-01-05 20:15:13'                       1     1\n",
       "5      6    1172    1274  '2015-01-05 20:42:41'                       1     1\n",
       "6      7    1641    1770  '2015-01-06 08:08:26'                       0     1\n",
       "7      8    2105    2280   2015-01-06 11:31:13'                       1     1\n",
       "8      9    2290    2506  '2015-01-06 17:08:35'                       1     1\n",
       "9     10    2562    2708  '2015-01-06 17:43:48'                       1     1\n",
       "10    11    3141    3284  '2015-01-07 10:01:57'                       0     1\n",
       "11    12    3524    3655   2015-01-07 13:32:43'                       0     1\n",
       "12    13    3659    3863  '2015-01-07 17:48:22'                       1     1\n",
       "13    14    3937    4125  '2015-01-07 18:26:49'                       1     1\n",
       "14    15    4145    4373  '2015-01-07 18:46:07'                       1     1\n",
       "15    16    4411    4538  '2015-01-07 19:18:08'                       1     1\n",
       "16    17    5700    5894    2015-01-08 7:08:43'                       0     1\n",
       "17    18    5913    6178   2015-01-08 13:23:42'                       1     1\n",
       "18    19    6238    6443   2015-01-08 18:06:47'                       1     1\n",
       "19    20    6629    6696   2015-01-08 20:18:58'                       1     1\n",
       "20    21    6713    6879   2015-01-08 20:32:16'                       1     1"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r = DataFrame(predict_result_test, columns = [u'预测结果']) # 给出预测类别测试集\n",
    "# predict_rate = DataFrame(model.predict(x_test), columns = [u'预测正确率']) # 给出预测类别测试集\n",
    "res = pd.concat([data_test.iloc[:,:5],r], axis=1)#测试集\n",
    "res.to_excel(testoutputfile)\n",
    "res\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
